<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 等待状态
        {
            let pro = new Promise((res,rej)=>{
                
            });
            console.log(pro);
            // 结果
            // [[Prototype]]: Promise
            // [[PromiseState]]: "pending"
            // [[PromiseResult]]: undefined
        }
        // 成功状态
        {
            let pro = new Promise((res,rej)=>{
                res("agshfdhafdjhag");
            });
            console.log(pro);
            console.log(pro.PromiseResult);
            // 结果
            // [[Prototype]]: Promise
            // [[PromiseState]]: "fulfilled"
            // [[PromiseResult]]: "agshfdhafdjhag"
        }
        // 失败状态
        {
            let pro = new Promise((res,rej)=>{
                rej("agshfdhafdjhag");
            });
            console.log(pro);
            // 结果
            // [[Prototype]]: Promise
            // [[PromiseState]]: "rejected"
            // [[PromiseResult]]: "agshfdhafdjhag"
        }
        
    </script>
</body>
</html>